<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Office/personnel')}">人员管理</a></li>
			<li><a href="{:url('Office/add')}">添加人员</a></li>
		</ul>
        <form class="well form-search" method="get" action="{:url('Office/personnel')}">
            人员姓名:
            <input type="text" class="form-control" name="user_nickname" style="width: 140px;" value="{:input('request.user_nickname/s','')}" placeholder="请输入人员姓名">
            账号:
            <input type="text" class="form-control" name="user_login" style="width: 140px;" value="{:input('request.user_login/s','')}" placeholder="请输入人员账号">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('Office/personnel')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="10%">账号</th>
                    <th width="8%">姓名</th>
                    <th width="5%">姓别</th>
					<th width="20%">部门</th>
					<th width="10%">联系电话</th>
					<th width="6%">{:lang('STATUS')}</th>
                    <th width="13%">最后登录时间</th>
					<th width="20%">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				
				<foreach name="users" item="vo">
				<tr>
                    <td>{$vo['user_login']}</td>
					<td>{$vo.user_nickname}</td>
					<td><php>echo $vo['sex']==1?'男':'女'</php></td>
					<td>{$vo.department_name}</td>
					<td>{$vo.mobile}</td>
					<td>
						<if ( $vo['user_status'] == 0)><span class="label label-danger">禁用</span>
							<else $vo['user_status'] == 1 /><span class="label label-success">正常</span>
						</if>
					</td>
                    <td>
						<if ( $vo['last_login_time'] ==0 )> 该用户还未登陆过
							<else /><php>echo date('Y-m-d H:i:s', $vo['last_login_time'])</php>
						</if>
					</td>
					<td>
						<a href='{:url("Office/editperson",array("id"=>$vo["id"]))}'>{:lang('EDIT')} </a> |
						<a class="js-ajax-delete" href="{:url('user/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                        |
                        <a href="{:url('Office/resetpassword',array('id'=>$vo['id']))}">重置密码</a>
						|
						<a class="js-ajax-delete" data-msg="确定更改状态吗？"
						   href="{:url('Office/status',array('id'=>$vo['id'],'show'=>$vo['user_status']))}"">{:lang('状态变更')}</a>
						<if !($vo['dept_type'] == "5" || $vo['dept_type'] == "7" || $vo['dept_type'] == "8")>
						|
						<a href="{:url('Office/permission',array('id'=>$vo['id']))}">设置权限</a>
						</if>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
</body>
</html>